from rest_framework import serializers
from .models import McService
from app.server_status.serializers import McForeignServerStatusSerializer

class McServiceSerializer(serializers.ModelSerializer):
    status = McForeignServerStatusSerializer(read_only=True)

    class Meta:
        model = McService
        fields = '__all__'

class McForeignServiceSerializer(serializers.ModelSerializer):
    class Meta:
        model = McService
        fields = ['id','name','sub_name']
